package com.xf.springbean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {

	public static void main(String[] args) {
		/*
		 * Spring01 s = new Spring01(); s.setName("world"); s.hello();
		 */
		// Spring01 s = (Spring01) SpringUtil.bean("helloworld");
		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
		Spring01 s = (Spring01) ctx.getBean("helloworld");
		Spring01 ss = (Spring01) ctx.getBean(Spring01.class);
		ss.hello();
	}

}
